layui.use('form', function () {
    var form = layui.form;
    form.on('submit(formDemo)', function (data) {
        layer.msg(JSON.stringify(data.field));
        return false;
    });
});
$(document).ready(function () {
    // var loginFrom = $('.login');
    // var modifyFrom = $('.modify');

    // $('.forgetPwd').click(function () {
    //     loginFrom.fadeOut(500);
    //     modifyFrom.fadeIn(500);
    // })

    // $('.offModify').click(function () {
    //     modifyFrom.fadeOut(500);
    //     loginFrom.fadeIn(500);
    // })


    $('.getCode').click(function () {
        let count = 60;
        const countDown = setInterval(() => {
            if (count === 0) {
                $('.getCode').text('重新发送').removeAttr('disabled');
                $('.getCode').css({
                    color: '#3BABFF',
                });
                clearInterval(countDown);
            } else {
                $('.getCode').attr('disabled', true);
                $('.getCode').css({
                    // background: '#d8d8d8',
                    color: '#707070',
                });
                $('.getCode').text(count + '秒');
            }
            count--;
        }, 1000);
    });

    $('.layui-btn-normal').on('click',function(){
        window.location.href='./modular/homePage/index.html';
    })
})

